<!--
 * @Description: 二级渠道新增按钮
 * @Version: 1.0
 * @Author: Yuanjy
 * @Date: 2020-04-14 21:31:58
 * @LastEditors: Yuanjy
 * @LastEditTime: 2020-04-18 17:22:35
 -->
<template>
  <div>
    <el-button size="mini" type="primary" @click="to">新增下级 </el-button>
    <eForm ref="form" :sup_this="sup_this" :is-add="false"/>
  </div>
</template>
<script>
import eForm from './secondForm'

export default {
  components: { eForm },
  props: {
    parentId: {
      type: Number,
      required: true
    },
    sup_this: {
      type: Object,
      required: true
    }
  },
  methods: {
    to() {
      const _this = this.$refs.form
      _this.form.level = 2
      _this.form.parent_id = this.parentId
      _this.form.status = '1'
      _this.getTopChannels()
      _this.dialog = true
    }
  }
}
</script>

<style scoped>
  div{
    display: inline-block;
    margin-right: 3px;
  }
</style>
